One or more aspects relate, in general, to processing within a computing environment, and in particular, to processing associated with cache management.
Managed Runtime Environments, as well as other environments, may employ a garbage collection (GC) function to remove memory objects from a software heap that are no longer in use. This function typically has to access a large section, or perhaps all, of the heap to determine if an object is no longer referenced by any other object. Since a great deal of memory is accessed, the garbage collection function typically exploits prefetch instructions.
Examples of prefetch instructions include the Prefetch Data (PFD) and Prefetch Data Relative Long (PFDRL) instructions, as defined in the z/Architecture offered by International Business Machines Corporation, Armonk, N.Y. The prefetch instructions instruct the central processing unit (CPU) to prefetch data of a cache line into a local data cache prior to the time that data is needed. Therefore, when the CPU actually needs data from the cache line for a subsequent load or store instruction, it is typically already in the cache, or at least on its way to being delivered from a higher level cache or main memory.
In a Managed Runtime Environment (MRTE) or similar environment, the code that is generated is often compiled by a Just-In-Time (JIT) compiler using a JIT compilation technique. The JIT compiler typically generates prefetch instructions to improve performance by attempting to reduce the latency associated with cache misses. To achieve good performance, the proper placement of prefetch instructions is to be determined. Also, the scheduling of instructions can affect cache utilization. For instance, if a load can be scheduled far in advance of a dependent instruction, the latency of a cache miss may be hidden, entirely or partially.